<template>
  <div>
    <div class="ranking">
      <div class="champion">
        <div class="imgtwo">
          <div class="back"></div>
          <img :src="rankingList[1].url" alt="" /><br />
          {{ rankingList[1].name }}
        </div>
        <div class="imgone">
          <div class="back"></div>
          <img :src="rankingList[0].url" alt="" /><br />
          {{ rankingList[0].name }}
        </div>
        <div class="imgthree">
          <div class="back"></div>
          <img :src="rankingList[2].url" alt="" /><br />
          {{ rankingList[2].name }}
        </div>
      </div>
    </div>
    <ul class="ulList">
      <li v-for="(item, index) in rankingList" :key="index" v-show="index > 2">
        <div class="index">{{ index + 1 }}</div>
        <div class="name">
          <p>{{ item.name }}</p>
          <p>{{ item.ification }}</p>
        </div>
        <div class="degree">
          <p class="ift-fire">{{ item.people }}万</p>
          <p>{{ item.classification }}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      rankingList: [
        {
          id: 1,
          name: "斗破苍穹",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
          url: "https://image.yqmh.com/mh/25934.jpg-300x400.webp",
        },
        {
          id: 2,
          name: "绝世战魂",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
          url: "https://image.yqmh.com/mh/107271.jpg-300x400.webp",
        },
        {
          id: 3,
          name: "逆天邪神",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
          url: "https://image.yqmh.com/mh/106518.jpg-300x400.webp",
        },
        {
          id: 4,
          name: "仙帝武尊",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
          url: "",
        },
        {
          id: 5,
          name: "仙帝武尊",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
        },
        {
          id: 6,
          name: "仙帝武尊",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
        },
        {
          id: 7,
          name: "仙帝武尊",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
        },
        {
          id: 8,
          name: "仙帝武尊",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
        },
        {
          id: 9,
          name: "仙帝武尊",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
        },
        {
          id: 10,
          name: "仙帝武尊",
          ification: "二次元动漫",
          people: 1109,
          classification: "热血 修真 玄幻 漫改",
        },
      ],
    };
  },
};
</script>
<style lang="less">
.ranking {
  width: 88%;
  margin: 8% auto 0;
  .champion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    text-align: center;
    font-size: 14px;
    div {
      width: 26%;
      position: relative;
      img {
        width: 72%;
        border: 2.5px solid white;
        border-radius: 5px;
      }
      .back {
        width: 40px;
        height: 40px;
        position: absolute;
        left: 32%;
        top: -18%;
        background-image: url(https://m.kanman.com/static/images/sprites/sprite.rank.3d5c7@2x.png);
        background-size: 240%;
        background-repeat: no-repeat;
      }
    }
    .imgone {
      width: 36%;
      .back {
        background-position: 0 0;
      }
    }
    .imgtwo {
      .back {
        background-position: 102% 0;
      }
    }
    .imgthree {
      .back {
        background-position: 7% 97%;
      }
    }
  }
}
.ulList {
  width: 94%;
  margin: 0 auto;
  margin-top: 20%;
  li {
    display: flex;
    align-items: center;
    height: 8vh;
    .index {
      text-align: center;
      width: 12%;
      font-size: 20px;
      font-weight: bold;
      color: #ddd;
    }
    .name {
      flex: 1;
      font-size: 14px;
      p {
        margin: 0;
        color: black;
        &:nth-child(2) {
          color: #999;
          font-size: 12px;
        }
      }
    }
    .degree {
      width: 34%;
      font-size: 12px;
      color: #999;
      p {
        margin: 0;
        text-align: right;
      }
    }
  }
}
</style>